package cn.dt70.services.impl;

import cn.dt70.dao.DataDictionaryDao.DataDictionaryMapper;
import cn.dt70.pojo.DataDictionary;
import cn.dt70.services.DataDictionaryService;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@Service("dataDictionaryService")
public class DataDictionaryServiceImpl implements DataDictionaryService {
    private static final Logger logger = Logger.getLogger(DataDictionaryServiceImpl.class  );
    @Resource
    private DataDictionaryMapper dataDictionaryMapper;

    @Override
    public List<DataDictionary> qryStatus() {
        List<DataDictionary> dataDictionaries=new ArrayList<>(  );
        try {
            dataDictionaries = dataDictionaryMapper.qryStatus();
        } catch (Exception e) {
            logger.error( "DataDictionaryServiceImpl.qryStatus异常"+e.getMessage() );
        }
        return dataDictionaries;
    }
//查询所有平台
    @Override
    public List<DataDictionary> qryFlatform() {
        List<DataDictionary> dataDictionaries=new ArrayList<>(  );
        try {
            dataDictionaries = dataDictionaryMapper.qryFlatform();
        } catch (Exception e) {
            logger.error( "DataDictionaryServiceImpl.qryFlatform"+e.getMessage() );
        }
        return dataDictionaries;
    }
}
